package com.macro.mall.storage.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author 郎
 */
@ConfigurationProperties(prefix = "storage")
@Data
public class StorageProperties {
    private String active;
    private Local local;
    private Aliyun aliyun;
    private Tencent tencent;
    private Qiniu qiniu;
    private Minio minio;
    private Seaweedfs seaweedfs;
    private Huawei huawei;

    @Data
    public static class Huawei {
        private String endpoint;
        private String accessKey;
        private String secretKey;
        private String bucketName;
        private String userDefineUrl;
    }

    @Data
    public static class Seaweedfs {
        private String host;
        private Integer port;
        private String publicDomain;
    }

    @Data
    public static class Minio {
        private String endpoint;
        private String bucketName;
        private String accessKey;
        private String secretKey;
    }

    @Data
    public static class Local {
        private String address;
        private String storagePath;
    }

    @Data
    public static class Tencent {
        private String secretId;
        private String secretKey;
        private String region;
        private String bucketName;
    }

    @Data
    public static class Aliyun {
        private String endpoint;
        private String accessKeyId;
        private String accessKeySecret;
        private String bucketName;
    }

    @Data
    public static class Qiniu {
        private String endpoint;
        private String accessKey;
        private String secretKey;
        private String bucketName;
    }
}
